﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiRapidRTRenderSettingsTraits : OdGiRenderSettingsTraits
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiRapidRTRenderSettingsTraits(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiRapidRTRenderSettingsTraits obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiRapidRTRenderSettingsTraits()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiRapidRTRenderSettingsTraits(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdGiRapidRTRenderSettingsTraits cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_cast(OdRxObject.getCPtr(pObj));
			OdGiRapidRTRenderSettingsTraits result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiRapidRTRenderSettingsTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiRapidRTRenderSettingsTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiRapidRTRenderSettingsTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_desc(), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_isA(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdGiRapidRTRenderSettingsTraits createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_createObject();
			OdGiRapidRTRenderSettingsTraits result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiRapidRTRenderSettingsTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiRapidRTRenderSettingsTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiRapidRTRenderSettingsTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setQuitCondition(OdGiQuitCondition condition)
		{
			GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_setQuitCondition(this.swigCPtr, (int)condition);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGiQuitCondition quitCondition()
		{
			OdGiQuitCondition result = (OdGiQuitCondition)GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_quitCondition(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setDesiredRenderLevel(int level)
		{
			GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_setDesiredRenderLevel(this.swigCPtr, level);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual int desiredRenderLevel()
		{
			int result = GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_desiredRenderLevel(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setDesiredRenderTime(int time)
		{
			GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_setDesiredRenderTime(this.swigCPtr, time);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual int desiredRenderTime()
		{
			int result = GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_desiredRenderTime(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setLightingMode(OdGiLightingMode mode)
		{
			GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_setLightingMode(this.swigCPtr, (int)mode);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGiLightingMode lightingMode()
		{
			OdGiLightingMode result = (OdGiLightingMode)GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_lightingMode(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setFilterType(OdGiFilterType type)
		{
			GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_setFilterType(this.swigCPtr, (int)type);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGiFilterType filterType()
		{
			OdGiFilterType result = (OdGiFilterType)GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_filterType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setFilterWidth(float width)
		{
			GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_setFilterWidth(this.swigCPtr, width);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual float filterWidth()
		{
			float result = GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_filterWidth(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setFilterHeight(float height)
		{
			GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_setFilterHeight(this.swigCPtr, height);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual float filterHeight()
		{
			float result = GlobalsPINVOKE.OdGiRapidRTRenderSettingsTraits_filterHeight(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
